package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.Region;
import cn.wolfcode.wolf2w.domain.Strategy;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * 攻略持久化接口
 */
public interface StrategyRepository extends MongoRepository<Strategy,String> {

    /**
     * 通过分类id 获取攻略
     * @param catalogId
     * @return
     */
    List<Strategy> findByCatalogId(String catalogId, Pageable pageable);

    /**
     * 通过目的地id 获取攻略
     * @param destId
     * @param pageable
     * @return
     */
    List<Strategy> findByDestId(String destId, Pageable pageable);
}
